package io.renren.modules.factory.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.factory.dao.TFactoryRawMeterialTypeDao;
import io.renren.modules.factory.entity.TFactoryRawMeterialTypeEntity;
import io.renren.modules.factory.service.TFactoryRawMeterialTypeService;


@Service("tFactoryRawMeterialTypeService")
public class TFactoryRawMeterialTypeServiceImpl extends ServiceImpl<TFactoryRawMeterialTypeDao, TFactoryRawMeterialTypeEntity> implements TFactoryRawMeterialTypeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TFactoryRawMeterialTypeEntity> page = this.page(
                new Query<TFactoryRawMeterialTypeEntity>().getPage(params),
                new QueryWrapper<TFactoryRawMeterialTypeEntity>()
                        .eq("seller_id",params.get("sellerId"))
        );

        return new PageUtils(page);
    }

}